//add game number, game date and time. IN SCRIPT var c = document.getElementById("myCanvas"); var ctx= c.getContext("2d"); //images var wpnt = new Image(); wpnt.src = "http://static-18.sinclairstoryline.com/resources/assets/wpnt/images/logos/wpnt-logo-footer.png"; wpnt.sheight = "40"; wpnt.swidth = "140"; var mlb = new Image(); mlb.src = "http://mlb.mlb.com/images/8/5/8/113325858/mlb.com_85zr0j8l.png"; mlb.sheight = "35"; mlb.swidth = "140"; var asn = new Image(); asn.src = "http://sbgi.net/wp-content/uploads/2015/01/ASN-logo1-360x420.png"; asn.sheight = "100"; asn.swidth = "80"; var plws = new Image(); plws.src = "https://bsbproduction.s3.amazonaws.com/portals/11115/logo635971718220418780.png"; plws.sheight = "248"; plws.swidth = "244"; var pony65 = new Image(); pony65.src = "http://www.youngsvillesportscomplex.com/wp-content/uploads/2013/10/Screen-Shot-2016-05-30-at-11.57.47-PM.png"; pony65.sheight = "248"; pony65.swidth = "244"; //FLAGS var mexflag = new Image(); mexflag.src = "https://upload.wikimedia.org/wikipedia/commons/9/9d/Flag_of_Mexico_(reverse).png"; mexflag.sheight = "25"; mexflag.swidth = "35"; var ctflag = new Image(); ctflag.src = "https://upload.wikimedia.org/wikipedia/commons/thumb/7/72/Flag_of_the_Republic_of_China.svg/2000px-Flag_of_the_Republic_of_China.svg.png" ctflag.sheight = "25"; ctflag.swidth = "35"; var gerflag = new Image gerflag.src = "https://upload.wikimedia.org/wikipedia/en/thumb/b/ba/Flag_of_Germany.svg/1280px-Flag_of_Germany.svg.png" gerflag.sheight = "25"; gerflag.swidth = "35"; var usflag = new Image(); usflag.src = "http://public.media.smithsonianmag.com/legacy_blog/06_13_2013_us-flag.gif" usflag.sheight = "25"; usflag.swidth = "35"; var wash = new Image(); wash.src = "https://bsbproduction.s3.amazonaws.com/portals/5659/homebanner/homebanner635242696343809387.png"; wash.sheight = "25"; wash.swidth = "35"; var hawaii = new Image(); hawaii.src = "https://upload.wikimedia.org/wikipedia/commons/thumb/e/ed/Flag_of_Hawaii_(1896).svg/2000px-Flag_of_Hawaii_(1896).svg.png"; hawaii.sheight = "25"; hawaii.swidth = "35"; var va = new Image(); va.src = "https://upload.wikimedia.org/wikipedia/commons/thumb/4/47/Flag_of_Virginia.svg/2000px-Flag_of_Virginia.svg.png"; va.sheight = "25"; va.swidth = "35"; var pa = new Image(); pa.src = "http://www.50states.com/flag/image/nunst063.gif" pa.sheight = "25"; pa.swidth = "35"; var tx = new Image(); tx.src = "https://upload.wikimedia.org/wikipedia/commons/thumb/f/f7/Flag_of_Texas.svg/2000px-Flag_of_Texas.svg.png" tx.sheight = "25"; tx.swidth = "35"; var mi = new Image(); mi.src = "https://upload.wikimedia.org/wikipedia/commons/thumb/b/b5/Flag_of_Michigan.svg/2000px-Flag_of_Michigan.svg.png" mi.sheight = "25"; mi.swidth = "35"; //addimages to canvas asn.onload = function() { ctx.drawImage(asn,410,580,asn.swidth,asn.sheight); } wpnt.onload = function() { ctx.drawImage(wpnt,500,630,wpnt.swidth,wpnt.sheight); } mlb.onload = function() { ctx.drawImage(mlb,500,580,mlb.swidth,mlb.sheight); } plws.onload = function() { ctx.drawImage(plws,750,50,plws.swidth,plws.sheight); } pony65.onload = function() { ctx.drawImage(pony65,750,950,pony65.swidth,pony65.sheight); } mexflag.onload = function() { ctx.drawImage(mexflag,0,75,mexflag.swidth,mexflag.sheight); } ctflag.onload = function() { ctx.drawImage(ctflag,c.width/7,250,ctflag.swidth,ctflag.sheight); } gerflag.onload = function() { ctx.drawImage(gerflag,0,825,gerflag.swidth,gerflag.sheight); } va.onload = function() { ctx.drawImage(va,0,275,va.swidth,va.sheight); } pa.onload = function() { ctx.drawImage(pa,0,400,pa.swidth,pa.sheight); ctx.drawImage(pa,0,200,pa.swidth,pa.sheight); } tx.onload = function() { ctx.drawImage(tx,0,625,tx.swidth,tx.sheight); } mi.onload = function() { ctx.drawImage(mi,0,750,mi.swidth,mi.sheight); } hawaii.onload = function() { ctx.drawImage(hawaii,c.width/7,775,hawaii.swidth,25); } wash.onload = function() { ctx.drawImage(wash,0,951,wash.swidth,wash.sheight); } //add text ctx.font = "bold 12px Arial"; ctx.fillText("Los Mochis,",40,82); ctx.fillText("MX",65,97); ctx.fillText("Chesterfield,",38,282); ctx.fillText("VA",65,297); ctx.fillText("Johnstown,",40,413); ctx.fillText("PA",65,428); ctx.fillText("Laredo, TX",40,642); ctx.fillText("Bay",60,763); ctx.fillText("County, MI",42,778); ctx.fillText("Paderborn,",40,832); ctx.fillText("GER",57,847); ctx.fillText("Maui, HI",c.width/7 + 42,792); ctx.fillText("Taipei",c.width/7 + 53,265); ctx.fillText("County, CT",c.width/7 + 40,280); ctx.fillText("Washington",40,965); ctx.fillText("Co., PA",55,978); ctx.fillText("Peters",55,213); ctx.fillText("Township, PA",36,228); //GAME NUMBERS ctx.font = "13px Calibri"; //first column ctx.fillText("Game 1",50,120); ctx.fillText("Game 2",50,320); ctx.fillText("Game 3",50,670); ctx.fillText("Game 4",50,870); //second column ctx.fillText("Game 5",c.width/7 + 50,170); ctx.fillText("Game 7",c.width/7 + 50,520); ctx.fillText("Game 6",c.width/7 + 50,820); ctx.fillText("Game 8",c.width/7 + 50,1070); //third column ctx.fillText("Game 11",2*c.width/7 + 50,220); ctx.fillText("Game 9",2*c.width/7 + 50,470); ctx.fillText("Game 12",2*c.width/7 + 50,720); ctx.fillText("Game 10",2*c.width/7 + 50,1020); //fourth column ctx.fillText("Game 13",3*c.width/7 + 50,420); ctx.fillText("Game 14",3*c.width/7 + 50,970); //fifth column ctx.fillText("Game 15",4*c.width/7 + 50,295); ctx.fillText("Game 16",4*c.width/7 + 50,845); //if necessary ctx.fillText("Game 17",9*c.width/14 + 50,530); ctx.fillText("Game 18",9*c.width/14 + 50,700); //championship ctx.fillText("Game 19",5*c.width/7 + 60,420); //GAME TIMES //first column ctx.fillText("August 5 5:30 PM",20,190); ctx.fillText("August 5 8:00 PM",20,390); ctx.fillText("August 6 12:00 PM",20,740); ctx.fillText("August 6 2:30 PM",20,940); //second column ctx.fillText("August 6 5:30 PM",c.width/7 + 20,240); ctx.fillText("August 7 2:30 PM",c.width/7 + 20,590); ctx.fillText("August 7 12:00 PM",c.width/7 + 20,890); ctx.fillText("August 7 5:00 PM",c.width/7 + 20,1140); //third column ctx.fillText("August 8 5:30 PM",2*c.width/7 + 20,340); ctx.fillText("August 8 10:00 AM",2*c.width/7 + 20,540); ctx.fillText("August 8 8:00 PM",2*c.width/7 + 20,840); ctx.fillText("August 8 12:30 PM",2*c.width/7 + 20,1090); //fourth column ctx.fillText("August 9 10:00 AM",3*c.width/7 + 20,490); ctx.fillText("August 9 12:30 PM",3*c.width/7 + 20,1040); //fifth column ctx.fillText("August 9 5:30 PM",4*c.width/7 + 20,440); ctx.fillText("August 9 8:00 PM",4*c.width/7 + 20,990); //if necessary ctx.fillText("August 10 TBD PM",9*c.width/14 + 20,580); ctx.fillText("August 10 TBD PM",9*c.width/14 + 20,750); //championship ctx.fillText("August 10 7:30 PM",5*c.width/7 + 25,840); //top half BRACKET LINES //first round ctx.moveTo(0,100); ctx.lineTo(c.width/7,100); ctx.lineTo(c.width/7,200); ctx.lineTo(0,200); ctx.moveTo(0,300); ctx.lineTo(c.width/7,300); ctx.lineTo(c.width/7,400); ctx.lineTo(0,400); //second round ctx.moveTo(c.width/7,150); ctx.lineTo(2*c.width/7,150); ctx.lineTo(2*c.width/7,250); ctx.lineTo(c.width/7,250); ctx.moveTo(c.width/7,350); ctx.lineTo(2*c.width/7,350); //third round ctx.moveTo(2*c.width/7,200); ctx.lineTo(3*c.width/7,200); ctx.lineTo(3*c.width/7,350); ctx.lineTo(2*c.width/7,350); //fourth round ctx.moveTo(3*c.width/7,275); ctx.lineTo(5*c.width/7,275); ctx.lineTo(5*c.width/7,450); ctx.lineTo(4*c.width/7,450); //losers bracket ctx.moveTo(c.width/7,500); ctx.lineTo(2*c.width/7,500); ctx.lineTo(2*c.width/7,600); ctx.lineTo(c.width/7,600); ctx.moveTo(2*c.width/7,450); ctx.lineTo(3*c.width/7,450); ctx.lineTo(3*c.width/7,550); ctx.lineTo(2*c.width/7,550); ctx.moveTo(3*c.width/7,400); ctx.lineTo(4*c.width/7,400); ctx.lineTo(4*c.width/7,500); ctx.lineTo(3*c.width/7,500); //bottom half BRACKET LINES //first round ctx.moveTo(0,650); ctx.lineTo(c.width/7,650); ctx.lineTo(c.width/7,750); ctx.lineTo(0,750); ctx.moveTo(0,850); ctx.lineTo(c.width/7,850); ctx.lineTo(c.width/7,950); ctx.lineTo(0,950); //second round ctx.moveTo(c.width/7,800); ctx.lineTo(2*c.width/7,800); ctx.lineTo(2*c.width/7,900); ctx.lineTo(c.width/7,900); ctx.moveTo(c.width/7,700); ctx.lineTo(2*c.width/7,700); //third round ctx.moveTo(2*c.width/7,700); ctx.lineTo(3*c.width/7,700); ctx.lineTo(3*c.width/7,850); ctx.lineTo(2*c.width/7,850); //fourth round ctx.moveTo(3*c.width/7,825); ctx.lineTo(5*c.width/7,825); ctx.lineTo(5*c.width/7,1000); ctx.lineTo(4*c.width/7,1000); //losers bracket ctx.moveTo(c.width/7,1050); ctx.lineTo(2*c.width/7,1050); ctx.lineTo(2*c.width/7,1150); ctx.lineTo(c.width/7,1150); ctx.moveTo(2*c.width/7,1000); ctx.lineTo(3*c.width/7,1000); ctx.lineTo(3*c.width/7,1100); ctx.lineTo(2*c.width/7,1100); ctx.moveTo(3*c.width/7,950); ctx.lineTo(4*c.width/7,950); ctx.lineTo(4*c.width/7,1050); ctx.lineTo(3*c.width/7,1050); //IF NECESSARY GAMES ctx.moveTo(9*c.width/14,510); ctx.lineTo(11*c.width/14,510); ctx.lineTo(11*c.width/14,590); ctx.lineTo(9*c.width/14,590); ctx.moveTo(11*c.width/14,550); ctx.lineTo(7*c.width/8,550); ctx.moveTo(9*c.width/14,680); ctx.lineTo(11*c.width/14,680); ctx.lineTo(11*c.width/14,760); ctx.lineTo(9*c.width/14,760); ctx.moveTo(11*c.width/14,720); ctx.lineTo(7*c.width/8,720); //CHAMPIONSHIP GAME ctx.moveTo(5*c.width/7,350); ctx.lineTo(7*c.width/8,350); ctx.lineTo(7*c.width/8,900); ctx.lineTo(5*c.width/7,900); //CHAMPS ctx.moveTo(7*c.width/8,635); ctx.lineTo(c.width,635); ctx.stroke();